package com.hgxd.entity.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 组织、项目表
 * </p>
 *
 * @author fsd
 * @since 2023-10-18
 */
@Data
@TableName("rb_organization")
@ApiModel(value = "Organization对象", description = "组织、项目表")
public class Organization  implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("名称")
    private String orgName;

    @ApiModelProperty("等级：1-父级，2-子级，3-孙级")
    private Integer level;

    @ApiModelProperty("等级：父级ID")
    private Long parentId;

    @ApiModelProperty("等级：父级名称")
    private String parentName;

    @ApiModelProperty("告警状态：0-正常，1-异常")
    private Integer alarmStatus;

    @ApiModelProperty("状态：0-正常、1-异常")
    private Integer orgStatus;

    @ApiModelProperty("创建时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime creatTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty("描述")
    private String comment;

    @ApiModelProperty("是否删除：0未删除，1已删除")
    @TableLogic
    private String isdelete;

    @TableField(exist = false)
    @ApiModelProperty("对应的孩子节点")
    private List<Organization> children;


}
